<?
$sql = "SELECT * FROM ".$pre."_movies ORDER BY releaseDate DESC";
$res = mysql_query($sql);
if(!$res)echo 'couldn\'t load the movies';else{
	while($data=mysql_fetch_object($res)){
		$trimmedDescr = $data->movieDesc;
		$trimmedDescr = substr($trimmedDescr,0,150);
		if($data->rating != NULL)$rating=$data->rating;else $rating="N/A";
echo '<div style="float:left;width:300px;>"<img src="'.$data->movieImage.'" width="100px" height="140px" style="float:left;width:100px;"/><div style="float:left;width:200px;">&#160;'.$data->movieName.'</div><span style="font-size:11px;">'.$trimmedDescr.'...</span><br/><span style="font-size:10px;color:red;"><b>Rating: '.$rating.'</b><br/><a href="'.$data->movieFlv.'">trailer</a></span></div>';
	}
}
?>